﻿using UnityEngine;
using System.Collections;

public class BM_Dragon : BM_DialogueToy {

	public Animation sword;

	private AudioClip	m_rHitAudioClip = null;


	public override void Awake ()
	{
		base.Awake ();

		m_rTalkAudioClip = new AudioClip[1];
		m_rTalkAudioClip[0] = Resources.Load("sfx_dragon_roar") as AudioClip;

		m_rHitAudioClip = Resources.Load("sfx_dragon_hit") as AudioClip;
	}

	public override void MidDialog(StringLabel currentLabel) {
		if(currentLabel ==  StringLabel.LABEL_DRAGON_2) {
			sword.CrossFade("righthand_attack");
			sword.CrossFadeQueued("righthand_idle");
		}
		else if(currentLabel ==  StringLabel.LABEL_DRAGON_3) {
			AudioSource.PlayClipAtPoint(m_rHitAudioClip, Vector3.zero, 1.0f);
		}
	}

	

}
